feat(iac): Enable flag for teeing otel-collector metrics to otel-router#2600
Conversation
❌ 7 Tests Failed:
View the full list of 13 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Code Review
The otel_router_http_port variable is missing from the nomad module call in the AWS provider, creating an inconsistency with the GCP implementation and preventing the log router port from being correctly propagated. The otel_router_http_port variable is defined in the GCP nomad module but is not passed to the logs_collector module, leaving the variable unused and the log teeing port unconfigured.
be089b5 to
ed716fe
Compare
|
@claude review |
There was a problem hiding this comment.
Looks good — prior feedback was addressed by removing the unused HTTP port variable, and the metrics flag/port are now correctly wired end-to-end and symmetrically across both providers.
Extended reasoning...
Overview
This PR adds an enable_otel_router_metrics feature flag (plus otel_router_grpc_port, default 4320) that conditionally adds a second metrics/external pipeline to the otel-collector config, exporting external customer metrics to a local otel-router via OTLP/gRPC. Touches 12 files across iac/modules/job-otel-collector, both provider Makefiles, and provider-aws / provider-gcp Terraform variables and module wiring.
Security risks
None identified. This is pure observability/config plumbing: a Boolean toggle (default false) and a port number, both gated behind %{ if enable_otel_router_metrics } template blocks. The new OTLP exporter targets 127.0.0.1 with tls.insecure: true, which is appropriate for a co-located router on the same node.
Level of scrutiny
Low. This is mechanical IaC config wiring — no logic, no auth/crypto, no data path changes by default. The chain is symmetric across AWS and GCP and follows the same pattern as the existing enable_otel_router_logs flag.
Other factors
The author addressed my prior review by removing the never-consumed otel_router_http_port variable that I flagged as misleading config surface. The current diff is tight and the new variables flow correctly: env → Makefile tfvar → root variables.tf → module.nomad → nomad/variables.tf → module.otel_collector → otel-collector.yaml template, with matching wiring on both providers.
The bug-hunter inline comment about ENABLE_OTEL_ROUTER_LOGS being absent from the Makefiles is correctly tagged as pre-existing (introduced in PR #2577). It is a one-line cleanup that an operator can work around via .terraform.<env>.tfvars, so I do not consider it a blocker for this PR.
PR SummaryMedium Risk Overview Reviewed by Cursor Bugbot for commit 374ea2f. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 575bc513ef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
575bc51 to
b261c67
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b261c67276
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 374ea2fc0e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
374ea2f to
b261c67
Compare
No description provided.